﻿<% @ Page Language="C#" AutoEventWireup="true" CodeBehind="menu.aspx.cs" Inherits="SaicMotor.menu.menu" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link href="../js_css/bootstrap/css/bootstrap.css" rel="stylesheet" />
    <link href="../js_css/bootstrap/css/bootstrap-theme.css" rel="stylesheet" />
    <link href="../js_css/bootstrap/css/bootstrap-treeview.min.css" rel="stylesheet" />
    <script src="../js_css/js/jquery-1.12.3.js"></script>
    <script src="../js_css/bootstrap/js/bootstrap.js"></script>
    <script src="../js_css/bootstrap/js/bootstrap-treeview.js"></script>
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
        <div id="tree">
        </div>
    </form>
    <script>
        function getTree() {
            var tree = [
                {
                    text: "公开信息",
                    
                    selectable : false,//设置为false将使节点展开，并且不能被选择。
                    nodes :[
                        {
                           
                            text: "密码设置",
                            href: "",
                        }
                        ],
                },
                 {
                     text: "AVI",
                     selectable: false,//设置为false将使节点展开，并且不能被选择。
                     
                     nodes: [
                         {
                             text: "过点信息",
                             href: "AVI_CrossPointInformation.aspx",
                         },                  
                     ]
                 },
                {
                    text: "ANDON",
                    
                    selectable: false,//设置为false将使节点展开，并且不能被选择。
                    nodes: [
                        {
                            text: "拉绳呼叫",
                            href: "AndonCall.aspx",
                        },
                        {
                            text: "停线时间",
                            href: "AndonStopTime.aspx",
                        },
                        {
                            text: "产量统计",
                            href: "AVI_ExcessiveInformation.aspx",
                        }              
                    ]
                },
                //{
                //    text: "系统设置(System Set)",
                //    selectable: false,//设置为false将使节点展开，并且不能被选择。
                //    nodes: [
                //        {
                //            text: "系统日志Systemlog",
                //            href: "AVI_CrossPointInformation.aspx",
                //        }
                //    ]

                //},
            ];
            return tree;
        }
        $('#tree').treeview({
            data: getTree(),
            collapseIcon: "glyphicon glyphicon-menu-down",
            expandIcon: "glyphicon glyphicon-menu-right",
        });

        $('#tree').on('nodeSelected', function (event, data) {
            console.log(event);
            console.log(data);
            var targetSrc = "";
            targetSrc = data.href;
            console.log(targetSrc);
            parent.document.getElementById("Main").src = targetSrc;
        })
    </script>
</body>
</html>
